home *** CD-ROM | disk | FTP | other *** search
/ Aminet 25 / Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso / Aminet / util / libs / ixemul_sdk.lha / include / sys / syscall.h < prev    next >
C/C++ Source or Header  |  1998-01-15  |  1KB  |  38 lines

  1. /*
  2.  *  This file is part of ixemul.library for the Amiga.
  3.  *  Copyright (C) 1991, 1992  Markus M. Wild
  4.  *
  5.  *  This library is free software; you can redistribute it and/or
  6.  *  modify it under the terms of the GNU Library General Public
  7.  *  License as published by the Free Software Foundation; either
  8.  *  version 2 of the License, or (at your option) any later version.
  9.  *
  10.  *  This library is distributed in the hope that it will be useful,
  11.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.  *  Library General Public License for more details.
  14.  *
  15.  *  You should have received a copy of the GNU Library General Public
  16.  *  License along with this library; if not, write to the Free
  17.  *  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  */
  19.  
  20. #ifndef _SYS_SYSCALL_H
  21. #define _SYS_SYSCALL_H
  22.  
  23. #define SYSTEM_CALL(func, vec) SYS_##func = vec,
  24.  
  25. enum _syscall_ {
  26. #include <sys/syscall.def>
  27. #undef SYSTEM_CALL
  28. };
  29.  
  30. #ifndef _KERNEL
  31. extern void *ixemulbase;
  32.  
  33. #define syscall(vec, args...) \
  34.   ({register int (*_sc)()=(void *)(&((char *)ixemulbase)[-((vec)+4)*6]); _sc(args);})
  35. #endif
  36.  
  37. #endif /* _SYS_SYSCALL_H */
  38.